package com.ljp.chat.entity.pojo;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ljp.chat.support.expansion.annotations.UniqueFiled;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 *
 * </p>
 *
 * @author LvJunPeng
 * @since 2022-11-02
 */
@Data
@Accessors(chain = true)
@TableName(value = "user")
public class User extends BaseEntity {

    /**
     * 用户真实姓名
     */
    @NotEmpty(message = "姓名不能为空")
    private String userName;

    /**
     * 用户账号
     */
    @UniqueFiled(filed = "account", message = "用户账号")
    @NotBlank(message = "用户账号不能为空")
    private String account;

    /**
     * 性别
     */
    @NotNull(message = "性别不能为空")
    private Integer sex;

    /**
     * 生日
     */
    @NotEmpty(message = "出生日期不能为空")
    private String birthday;

    /**
     * 邮箱地址
     */
    @NotEmpty(message = "邮箱不能为空")
    @UniqueFiled(filed = "email", message = "邮箱地址", group = "email")
    private String email;

    /**
     * 身高
     */
    private Double height;

    /**
     * 体重
     */
    private Double weight;

    /**
     * 学校
     */
    private String school;

    /**
     * 家乡地址
     */
    private String address;

    /**
     * 职业
     */
    private String occupation;

    /**
     * 电话号
     */
    private String phone;

    /**
     * 星座
     */
    private String constellation;

    /**
     * 逻辑删除 1：true 0：false
     */
    @TableLogic(value = "false", delval = "true")
    private Boolean isDelete;
}
